<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Class template tlv_type_&lt;boost::optional&lt; T &gt;, TLV&gt;</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="ODTONE 0.4">
<link rel="up" href="../../odtone_mih_library.html#header..home.carlos.Projectos.odtone.inc.odtone.mih.tlv_hpp" title="Header &lt;/home/carlos/Projectos/odtone/inc/odtone/mih/tlv.hpp&gt;">
<link rel="prev" href="tlv_type_.html" title="Class template tlv_type_">
<link rel="next" href="tlv_cast_.html" title="Class template tlv_cast_">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="'ODTONE - Open Dot Twenty One'" width="100" height="100" src="../.././images/logo.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="tlv_type_.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../../odtone_mih_library.html#header..home.carlos.Projectos.odtone.inc.odtone.mih.tlv_hpp"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="tlv_cast_.html"><img src="../../images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="odtone.mih.tlv_type_boost_optional_idp5688352"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template tlv_type_&lt;boost::optional&lt; T &gt;, TLV&gt;</span></h2>
<p>odtone::mih::tlv_type_&lt;boost::optional&lt; T &gt;, TLV&gt;</p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../odtone_mih_library.html#header..home.carlos.Projectos.odtone.inc.odtone.mih.tlv_hpp" title="Header &lt;/home/carlos/Projectos/odtone/inc/odtone/mih/tlv.hpp&gt;">/home/carlos/Projectos/odtone/inc/odtone/mih/tlv.hpp</a>&gt;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">typename</span> TLV<span class="special">&gt;</span> 
<span class="keyword">class</span> <a class="link" href="tlv_type_boost_optional_idp5688352.html" title="Class template tlv_type_&lt;boost::optional&lt; T &gt;, TLV&gt;">tlv_type_</a><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;</span><span class="special">,</span> <span class="identifier">TLV</span><span class="special">&gt;</span> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
  <span class="comment">// types</span>
  <span class="keyword">typedef</span> <a class="link" href="tlv_type_.html" title="Class template tlv_type_">tlv_type_</a><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;</span><span class="special">,</span> <span class="identifier">TLV</span> <span class="special">&gt;</span> <a name="odtone.mih.tlv_type_boost_optional_idp5688352.tlv_type"></a><span class="identifier">tlv_type</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="tlv_type_boost_optional_idp5688352.html#idp5690624-bb">public member functions</a></span>
   <a class="link" href="tlv_type_boost_optional_idp5688352.html#idp5690840-bb"><span class="identifier">tlv_type_</span></a><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="tlv_type_boost_optional_idp5688352.html#idp5692200-bb"><span class="identifier">serialize</span></a><span class="special">(</span><a class="link" href="iarchive.html" title="Class iarchive">iarchive</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="tlv_type_boost_optional_idp5688352.html#idp5693792-bb"><span class="identifier">serialize</span></a><span class="special">(</span><a class="link" href="oarchive.html" title="Class oarchive">oarchive</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="idp12844632"></a><h2>Description</h2>
<p>The MIH types support serialization and deserialization for the input archive and output archive. However, these particular archives do not include the TLVs fields. So this class is responsible for managing the optional TLVs and for offering mechanisms to serialize and deserialize them. </p>
<div class="refsect2">
<a name="idp12845264"></a><h3>
<a name="idp5690624-bb"></a><code class="computeroutput">tlv_type_</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"> <a name="idp5690840-bb"></a><span class="identifier">tlv_type_</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">optional</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;</span> <span class="special">&amp;</span> val<span class="special">)</span><span class="special">;</span></pre>
<p>Construct a TLV of a particular type.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">val</code></span></p></td>
<td><p>value of the TLV. </p></td>
</tr></tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="idp5692200-bb"></a><span class="identifier">serialize</span><span class="special">(</span><a class="link" href="iarchive.html" title="Class iarchive">iarchive</a> <span class="special">&amp;</span> ar<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>Deserialize the TLV type value.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">ar</code></span></p></td>
<td><p>The input archive from where parse the TLV value. </p></td>
</tr></tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="idp5693792-bb"></a><span class="identifier">serialize</span><span class="special">(</span><a class="link" href="oarchive.html" title="Class oarchive">oarchive</a> <span class="special">&amp;</span> ar<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>Serialize the TLV type value.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">ar</code></span></p></td>
<td><p>The output archive to where serialize the TLV value. </p></td>
</tr></tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
</ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009-2012 Universidade
      Aveiro<br>Copyright &#169; 2009-2012 Instituto
      de Telecomunica&#231;&#245;es - P&#243;lo Aveiro<p>
        This software is distributed under a license. The full license agreement
        can be found in the LICENSE in this distribution. This software may not be
        copied, modified, sold or distributed other than expressed in the named license
        agreement. This software is distributed without any warranty.
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="tlv_type_.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../../odtone_mih_library.html#header..home.carlos.Projectos.odtone.inc.odtone.mih.tlv_hpp"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="tlv_cast_.html"><img src="../../images/next.png" alt="Next"></a>
</div>
</body>
</html>
